from mako import runtime, filters, cache
UNDEFINED = runtime.UNDEFINED
__M_dict_builtin = dict
__M_locals_builtin = locals
_magic_number = 5
_modified_time = 1261437142.462986
_template_filename='/home/dcrowdy/src/arkaiv/arkaiv/templates/playlists.mak'
_template_uri='/playlists.mak'
_template_cache=cache.Cache(__name__, _modified_time)
_source_encoding=None
_exports = []


def _mako_get_namespace(context, name):
    try:
        return context.namespaces[(__name__, name)]
    except KeyError:
        _mako_generate_namespaces(context)
        return context.namespaces[(__name__, name)]
def _mako_generate_namespaces(context):
    pass
def _mako_inherit(template, context):
    _mako_generate_namespaces(context)
    return runtime._inherit_from(context, u'/autohandler', _template_uri)
def render_body(context,**pageargs):
    context.caller_stack._push_frame()
    try:
        __M_locals = __M_dict_builtin(pageargs=pageargs)
        h = context.get('h', UNDEFINED)
        c = context.get('c', UNDEFINED)
        __M_writer = context.writer()
        # SOURCE LINE 1
        __M_writer(u' \n<h2>\nPlaylists\n</h2>\n\n<table>\n')
        # SOURCE LINE 7
        for p in c.playlists:
            # SOURCE LINE 8
            __M_writer(u'<tr>\n<td>')
            # SOURCE LINE 9
            __M_writer(unicode( h.link_to(p['name'], h.url_for(action="displayplaylist", id=p['index'], name=p['name']))))
            __M_writer(u'</td>\n')
            # SOURCE LINE 10
            __M_writer(unicode( h.form(h.url_for(action='deleteplaylist'), multipart=True) ))
            __M_writer(u'\n<td>\n')
            # SOURCE LINE 12
            __M_writer(unicode( h.submit('Delete') ))
            __M_writer(u'\n</td>\n')
            # SOURCE LINE 14
            __M_writer(unicode( h.hidden_field('playlistname', value=p['name']) ))
            __M_writer(u'\n')
            # SOURCE LINE 15
            __M_writer(unicode( h.end_form() ))
            __M_writer(u' \n</tr>\n')
        # SOURCE LINE 18
        __M_writer(u'<table>\n\n<hr>\nAdd new playlist:\n')
        # SOURCE LINE 22
        __M_writer(unicode( h.form(h.url_for(action='addplaylist'), multipart=True) ))
        __M_writer(u' \n')
        # SOURCE LINE 23
        __M_writer(unicode( h.text_field('newplaylist') ))
        __M_writer(u'\n')
        # SOURCE LINE 24
        __M_writer(unicode( h.submit('Add') ))
        __M_writer(u' \n')
        # SOURCE LINE 25
        __M_writer(unicode( h.end_form() ))
        __M_writer(u' \n\n')
        return ''
    finally:
        context.caller_stack._pop_frame()


